package com.black.utils.command;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author ylx
 */
@Getter
@Setter
public abstract class CmdExecutor
{
    public static final String BASH_SHELL = "/bin/bash";

    public static final String SH_SHELL = "/bin/sh";

    public static final String PARAM_C = "-c";

    public static final String DELIMITER = " && ";

    protected boolean isPrintOutput = true;

    public abstract String pwd();

    public abstract List<String> ls();

    public abstract List<String> ls(String path);

    public abstract List<String> ll();

    public abstract List<String> ll(String path);

    public abstract boolean cd(String path);

    public abstract boolean mv(String source, String target);

    public abstract boolean rename(String source, String target);

    public abstract boolean rm(String path);

    public abstract boolean rmdir(String path);

    public abstract boolean mkdir(String path);

    public abstract boolean mkdirs(String path);

    public abstract String ip();

    public abstract boolean exec(String... cmd);

    public abstract boolean exec(String cmd);

    public abstract List<String> execute(String cmd);
}
